﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.master" AutoEventWireup="true" CodeFile="Posts.aspx.cs" Inherits="Menus_Posts" %>

<%@ Register src="../UserControls/SiteVersionTab.ascx" tagname="SiteVersionTab" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="phActions" Runat="Server">
    <asp:LinkButton ID="lnkSave" Text="Save" runat="server" 
        onclick="lnkSave_Click" />
    <asp:LinkButton ID="lnkCancel" Text="Cancel" runat="server" 
        onclick="lnkCancel_Click" />
    <asp:LinkButton ID="lnkEdit" Text="Edit" runat="server" 
        onclick="lnkEdit_Click" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phSubMenu" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="phMain" Runat="Server">
    <ajax:Accordion ID="title" SkinID="Title" runat="server">
        <HeaderTemplate>
            <%#Eval("Name") %>
        </HeaderTemplate>
        <ContentTemplate>
            <ul class="form">
                <li>
                    <asp:Label ID="Label1" AssociatedControlID="lblParentPath" Text="Parent Path" runat="server" />
                    <asp:Label ID="lblParentPath" Text='<%#Eval("ParentPath") %>' runat="server"/>
                </li>
                <li>
                    <asp:Label ID="Label2" AssociatedControlID="lblIncludeParent" Text="Include Parent" runat="server" />
                    <asp:Label ID="lblIncludeParent" Text='<%#Eval("IncludeParent") %>' runat="server"/>
                </li>
                <li>
                    <asp:Label ID="Label4" AssociatedControlID="lblDefault" Text="Default" runat="server" />
                    <asp:Label ID="lblDefault" Text='<%#Eval("DefaultForAllPosts") %>' runat="server"/>
                </li>
                <li>
                    <asp:Label ID="Label6" AssociatedControlID="lblNotes" Text="Notes" runat="server" />
                    <asp:Label ID="lblNotes" Text='<%#Eval("Notes") %>' runat="server"/>
                </li>
            </ul>
        </ContentTemplate>
    </ajax:Accordion>
    <div class="itemPanel">
        <uc1:SiteVersionTab ID="siteVersionTab" OnSelectedVersionChanged="siteVersionTab_SelectedVersionChanged" runat="server" />
        <asp:Panel ID="pnlSelRelative" CssClass="tabPage" runat="server">
            <p>This menu is relative so please select which post you wish to view the menu on.</p>
            <telerik:RadTreeView ID="treeRelative" DataSourceID="dsRelative" 
                runat="server"  MaxDataBindDepth="2"
                onnodeclick="treeRelative_NodeClick" ondatabound="treeRelative_DataBound" 
                onnodeexpand="treeRelative_NodeExpand">
                <DataBindings>
                    <telerik:RadTreeNodeBinding ValueField="PostGuid" TextField="DisplayName" />
                </DataBindings>
            </telerik:RadTreeView>
        </asp:Panel>
        <asp:Panel ID="pnlDisplay" CssClass="tabPage" runat="server">
            <acms:Columns ID="colDisplay" IncludeShadow="false" runat="server">
                <acms:FixedWidthColumn ID="colChildren" Visible="false" Width="200px" Float="Right" runat="server">
                    <h2>Children</h2>
                    <asp:Panel ID="Panel1" CssClass="itemPanel" runat="server">
                        <asp:CheckBoxList ID="cblChildren" runat="server" DataValueField="PostGuid" DataTextField="DisplayName" OnDataBinding="cblChildren_DataBinding" OnDataBound="cblChildren_DataBound"/>
                    </asp:Panel>
                </acms:FixedWidthColumn>
                <acms:FixedWidthColumn ID="colSiblings" Visible="false" Width="250px" Float="Right" runat="server" >
                    <h2>Siblings</h2>
                    <asp:Panel ID="pnlSiblings" CssClass="itemPanel" runat="server">
                        <asp:CheckBoxList ID="cblSiblings" DataValueField="PostGuid" DataTextField="DisplayName" runat="server" OnDataBinding="cblSiblings_DataBinding"  OnDataBound="cblSiblings_DataBound" />
                    </asp:Panel>
                </acms:FixedWidthColumn>
                <acms:FillColumn ID="colTree" runat="server">
                    <h2>Menu</h2>
                    <asp:Label ID="lblRelative" runat="server" />
                    <telerik:RadTreeView ID="treeMenu" DataSourceID="dsMenu" runat="server" MaxDataBindDepth="2" OnDataBound="treeMenu_DataBound" onnodeexpand="treeMenu_NodeExpand" OnNodeClick="treeMenu_NodeClick">
                        <DataBindings>
                            <telerik:RadTreeNodeBinding ValueField="PostGuid" TextField="DisplayName"  />
                        </DataBindings>
                    </telerik:RadTreeView>
                </acms:FillColumn>
            </acms:Columns>
        </asp:Panel>
    </div>
    <acms:AcmsSiteMapDataSource ID="dsMenu" runat="server" />
    <acms:AcmsSiteMapDataSource ID="dsRelative" runat="server" />
</asp:Content>

